package cn.lyh.FoodSystem.Service.ImpI;

import cn.lyh.FoodSystem.Dto.PageInfo;
import cn.lyh.FoodSystem.Dto.Result;
import cn.lyh.FoodSystem.Entity.Study;
import cn.lyh.FoodSystem.Service.StudyService;
import cn.lyh.system.domain.SysUser;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class StudyServiceImpI implements StudyService {



    /**
     * 添加学习记录
     */
    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED )
    public Result addStudy(Study study){
        Result result = new Result();
        try {

        }catch (Exception e){
            result.setCode(500);
            result.setMsg("程序错误！");
            result.setData(e.getCause());
        }
        return result;
    }
    /**
     * 查询学习记录
     */
    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED )
    public Result queryStudy(SysUser user){
        Result result = new Result();
        try {

        }catch (Exception e){
            result.setCode(500);
            result.setMsg("程序错误！");
            result.setData(e.getCause());
        }
        return result;
    }
    /**
     * 查询学习记录 后台
     */
    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED )
    public Result queryStudyAll(PageInfo pageInfo){
        Result result = new Result();
        try {

        }catch (Exception e){
            result.setCode(500);
            result.setMsg("程序错误！");
            result.setData(e.getCause());
        }
        return result;
    }
    /**
     * 更新学习记录
     */
    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED )
    public Result updateStudy(Study study){
        Result result = new Result();
        try {

        }catch (Exception e){
            result.setCode(500);
            result.setMsg("程序错误！");
            result.setData(e.getCause());
        }
        return result;
    }
    /**
     * 删除学习记录
     */
    @Override
    @Transactional(propagation = Propagation.NOT_SUPPORTED )
    public Result deleteStudy(Study study){
        Result result = new Result();
        try {

        }catch (Exception e){
            result.setCode(500);
            result.setMsg("程序错误！");
            result.setData(e.getCause());
        }
        return result;
    }
}
